---
title: Testing
description: James loves writing tests
---


We use [vitest](https://vitest.dev/) for our unit and integration tests. You can run the tests with:

```bash
pnpm install
pnpm test
```

## API Tests

`/apps/api` is our core product and needs to be heavily tested. Unit tests are not enough so we also use integration tests:

### `integration`

Full end to end tests require a running API either locally or in a deployed environment.
  ```bash
  cd apps/api

  UNKEY_BASE_URL=
  UNKEY_ROOT_KEY=
  pnpm test:integration
  ```


### Clickhouse Tests

`/internal/clickhouse` is where we store our ClickHouse queries. To run tests locally, please install [goose](https://pressly.github.io/goose).

To install `goose`:

```bash
go install github.com/pressly/goose/v4/cmd/goose@latest
```
 
